package com.whfc.emp.dao;

import com.whfc.emp.dto.AppExamRecordDTO;
import com.whfc.emp.entity.AppExamRecord;
import com.whfc.emp.param.AppExamRecordListParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: realm
 * @date: 2025-10-22 15:24
 * @description: //todo
 */
public interface AppExamRecordMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(AppExamRecord record);

    int insertSelective(AppExamRecord record);

    AppExamRecord selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(AppExamRecord record);

    int updateByPrimaryKey(AppExamRecord record);

    /**
     * 获取培训列表
     *
     * @param request
     * @return
     */
    List<AppExamRecordDTO> selectByParam(AppExamRecordListParam request);

    /**
     * 删除培训记录
     *
     * @param id
     */
    void deleteLogicById(@Param("id") Integer id);


    /**
     * 根据用户ID和试卷ID查询
     *
     * @param userId
     * @param examPaperId
     * @return
     */
    AppExamRecord selectByUserIdAndExamPaperId(@Param("userId") Integer userId,@Param("examPaperId") Integer examPaperId);
}